package com.superm.service;

import com.superm.entity.Member;
import com.superm.entity.SaleOrder;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;


public interface SaleOrderService {
    /**
     *  添加一条订单
     * @param saleOrder
     * @return
     */
    Integer  addSaleOrder(SaleOrder saleOrder);
    /**
     * 根据订单号查询出来某条订单信息
     * @return
     */
    SaleOrder queryId(@Param("saleOrderCode") String  saleOrderCode);

    /**
     * 结账操作
     * @param ords
     * @param paymanner
     * @param member 会员信息
     * @return
     */
    Map<String,Object> addSaleOrder(List<Integer> ords, String paymanner, Member member);
    /**
     * 根据当前登录的id 查询出来刚添加的订单信息
     * @param empid
     * @return
     */
    List<SaleOrder> allSaleEmpid(@Param("empid") Integer empid);
    /**
     * 查询所有订单信息
     * @return
     */
    List<SaleOrder> allSaleOrder(String saleOrderCode,Integer pageNo,Integer pageSize);
    /**
     * 查询订单数量
     * @return
     */
    Integer saleOrderCount(@Param("saleOrderCode") String saleOrderCode);
}
